import request from '@/utils/request'

export function list(query) {
  const data = {
    per_page: query.limit,
    page: query.page
  }
  return request({
    url: '/api/backstage/company/task',
    method: 'get',
    params: data
  })
}

export function create(data) {
  return request({
    url: '/api/backstage/company/task',
    method: 'post',
    data
  })
}

export function update(data, id) {
  return request({
    url: '/api/backstage/company/task/' + id,
    method: 'put',
    data
  })
}

export function firstId(id) {
  return request({
    url: '/api/backstage/company/task/' + id,
    method: 'get'
  })
}
